home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mh / mh-6.8 / h / strings.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-14  |  1.6 KB  |  72 lines

  1. /* strings.h - define standard string functions */
  2. /* @(#)$Id: strings.h,v 1.18 1992/11/12 19:34:05 jromine Exp $ */
  3.  
  4. #ifndef    _STRINGS        /* once-only... */
  5. #define    _STRINGS
  6.  
  7. #ifdef AUX
  8. #include <stdlib.h>
  9. #endif
  10.  
  11. #ifdef _AIX
  12. #include <string.h>
  13. #include <stdlib.h>
  14.  
  15. #define bcmp(b1,b2,length)    memcmp(b1, b2, length)
  16. #define    bcopy(b1,b2,length)    (void) memcpy (b2, b1, length)
  17. #define    bcpy(b1,b2,length)    memcmp (b1, b2, length)
  18. #define    bzero(b,length)        (void) memset (b, 0, length)
  19.  
  20. #else /* _AIX */
  21.  
  22. #ifdef    SYS5
  23. #define    index    strchr
  24. #define    rindex    strrchr
  25. #endif /* SYS5 */
  26.  
  27. #if    defined(BSD42) || defined(SVR4)
  28. #ifndef    SVR4
  29. #include <strings.h>
  30. #else
  31. #include <string.h>
  32. #include <stdlib.h>
  33. #endif
  34. #else    /* not BSD42 || SVR4 */
  35. char   *index ();
  36. char   *mktemp ();
  37. char   *rindex ();
  38. #ifndef    SPRINTFTYPE
  39. #ifndef    ncr        /* NCR compiler complains about re-declaration */
  40. char   *sprintf ();        /* I guess this is the new standard */
  41. #endif
  42. #else
  43. SPRINTFTYPE sprintf ();
  44. #endif
  45. char   *strcat ();
  46. int     strcmp ();
  47. char   *strcpy ();
  48. int    strlen ();
  49. char   *strncat ();
  50. int     strncmp ();
  51. char   *strncpy ();
  52. #endif
  53.  
  54. #ifndef    SVR4
  55. char   *getenv ();
  56. char   *calloc (), *malloc (), *realloc ();
  57. #endif    /* SVR4 */
  58.  
  59. #if defined(__HIGHC__) || __GNUC__ == 2
  60. #define    bcopy(s,d,l)    memcpy(d,s,l)
  61. #endif
  62.  
  63. #ifdef    SYS5
  64. #include <memory.h>
  65. #define bcmp(b1,b2,length)    memcmp(b1, b2, length)
  66. #define    bcopy(b1,b2,length)    (void) memcpy (b2, b1, length)
  67. #define    bcpy(b1,b2,length)    memcmp (b1, b2, length)
  68. #define    bzero(b,length)        (void) memset (b, 0, length)
  69. #endif /* SYS5 */
  70. #endif    /* _AIX */
  71. #endif /* not _STRINGS */
  72.